home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 11587 / 11587.xpi / chrome / aviary.jar / content / options.xul < prev    next >
Extensible Markup Language  |  2009-08-14  |  6KB  |  139 lines

  1. <?xml version="1.0"?>
  2. <!-- Copyright (c) 2008-2009 Pearl Crescent, LLC.  All Rights Reserved.  -->
  3. <!-- vim: set sw=2 sts=2 ts=8 et syntax=xml: -->
  4.  
  5. <?xml-stylesheet href="chrome://global/skin/global.css"?>
  6. <?xml-stylesheet href="chrome://aviary/skin/options.css"?>
  7.  
  8. <!DOCTYPE prefwindow SYSTEM "chrome://aviary/locale/extension.dtd">
  9.  
  10. <prefwindow id="aviaryPrefsWindow" title="&prefsWindow.title;"
  11.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  12.         windowtype="aviary:prefs"
  13.         screenX="50"
  14.         screenY="50"
  15.         persist="screenX screenY"
  16.         buttons="accept,cancel"
  17.         onload="doInitialize();">
  18.  
  19.   <script type="application/x-javascript"
  20.           src="chrome://aviary/content/pearlutil.js"/>
  21.   <script type="application/x-javascript"
  22.           src="chrome://aviary/content/util.js"/>
  23.  
  24.   <script type="application/x-javascript"><![CDATA[
  25.     function doInitialize()
  26.     {
  27.       const kAuthServiceCID = "@aviary.com/aviary-auth;1";
  28.       var authService = Components.classes[kAuthServiceCID]
  29.                               .getService(Components.interfaces.aviaryIAuth);
  30.       gAviaryUtil.HideInactiveTools(authService.toolsList);
  31.  
  32.       // If pref. says item should be on a toolbar but it is not, reset pref.
  33.       try
  34.       {
  35.         var opener = window.opener;
  36.         while (opener &&
  37.                opener.document.documentElement
  38.                      .getAttribute("windowtype") != "navigator:browser")
  39.         {
  40.           opener = opener.opener;
  41.         }
  42.  
  43.         if (opener)
  44.         {
  45.           var tbItem = opener.document
  46.                              .getElementById("aviary-captureimageofpage");
  47.           if (!tbItem)
  48.           {
  49.             const kTBItemLocationPref = "aviary.toolbarItem.location";
  50.             var pearlUtil = com.aviary.talon.pearlutil;
  51.             var locPref = pearlUtil.GetASCIIPref(kTBItemLocationPref);
  52.             if (locPref && ("status-bar" != locPref))
  53.               pearlUtil.SetASCIIPref(kTBItemLocationPref, "");
  54.           }
  55.         }
  56.       } catch(e) {}
  57.     }
  58.   ]]>
  59.   </script>
  60.  
  61.   <prefpane id="aviary-prefpane">
  62.     <script type="application/x-javascript"
  63.             src="chrome://global/content/nsWidgetStateManager.js" />
  64.     <script type="application/x-javascript"
  65.             src="chrome://browser/content/nsPrefWindow.js" />
  66.  
  67.     <preferences>
  68.       <preference id="pref-toolbarItemLoc" type="string"
  69.                   name="aviary.toolbarItem.location" />
  70.       <preference id="pref-defaultImageEditor" type="int"
  71.                   name="aviary.defaultImageEditor" />
  72.       <preference id="pref-defaultCaptureType" type="int"
  73.                   name="aviary.defaultCaptureType" />
  74.     </preferences>
  75.  
  76.     <grid flex="1">
  77.       <columns><column/><column/></columns>
  78.       <rows>
  79.         <row align="center">
  80.           <hbox pack="end">
  81.             <label control="menulist-toolbarItemLoc">&prefsTBItemLocation.label;</label>
  82.           </hbox>
  83.           <menulist id="menulist-toolbarItemLoc"
  84.                     preference="pref-toolbarItemLoc">
  85.             <menupopup>
  86.               <menuitem label="&prefsTBItemLocationNavBar.label;"
  87.                         value="nav-bar"/>
  88.               <menuitem label="&prefsTBItemLocationStatusBar.label;"
  89.                         value="status-bar"/>
  90.               <menuitem label="&prefsTBItemLocationNotShown.label;"
  91.                         value=""/>
  92.             </menupopup>
  93.           </menulist>
  94.         </row>
  95.         <row align="center">
  96.           <hbox pack="end">
  97.             <label control="menulist-defaultCaptureType">&prefsCaptureType.label;</label>
  98.           </hbox>
  99.           <menulist id="menulist-defaultCaptureType"
  100.                     preference="pref-defaultCaptureType">
  101.             <menupopup>
  102.               <menuitem label="&aviaryCaptureImageOfPageRegion.label;"
  103.                         value="0"/>
  104.               <menuitem label="&aviaryCaptureImageOfPageVisible.label;"
  105.                         value="1"/>
  106.               <menuitem label="&aviaryCaptureImageOfPageFull.label;"
  107.                         value="2"/>
  108.             </menupopup>
  109.           </menulist>
  110.         </row>
  111.         <row align="center">
  112.           <hbox pack="end">
  113.             <label control="menulist-defaultImageEditor">&prefsEditor.label;</label>
  114.           </hbox>
  115.           <menulist id="menulist-defaultImageEditor"
  116.                     preference="pref-defaultImageEditor">
  117.             <menupopup>
  118.               <menuitem id="aviary-falcon" label="&aviaryFalcon.label;"
  119.                         aviary-tid="20" value="20"/>
  120.               <menuitem id="aviary-phoenix" label="&aviaryPhoenix.label;"
  121.                         aviary-tid="1" value="1"/>
  122.               <menuitem id="aviary-toucan" label="&aviaryToucan.label;"
  123.                         aviary-tid="2" value="2"/>
  124.               <menuitem id="aviary-peacock" label="&aviaryPeacock.label;"
  125.                         aviary-tid="3" value="3"/>
  126.               <menuitem id="aviary-raven" label="&aviaryRaven.label;"
  127.                         aviary-tid="4" value="4"/>
  128.               <menuitem id="aviary-hummingbird" label="&aviaryHummingbird.label;"
  129.                         aviary-tid="5" value="5"/>
  130.               <menuitem id="aviary-woodpecker" label="&aviaryWoodpecker.label;"
  131.                         aviary-tid="14" value="14"/>
  132.             </menupopup>
  133.           </menulist>
  134.         </row>
  135.       </rows>
  136.     </grid>
  137.   </prefpane>
  138. </prefwindow>
  139.